SQL by Reed Mark

SQL by Reed Mark
Author: Reed, Mark
Language: eng
Format: epub
Published: 2022-02-11

1

Cardiology

Dr. Simon

100

2

Pathology

Dr. Greg

150

Now that we are creating two tables, the third condition of 2NF requires that we create a relationship between the two tables using a foreign key. Here, we know that one department can have many patients. This means that we should add a foreign key column to the Patient table that refers to the ID column of the Department table. The Department table will not change from what is shown above, and the updated Patient table will look like this:

Patient Table

PatientID

PatientName

PatientAge

PatientGender

DepID